-- GENERATED SPELL FOR [Azure Sorceror] --


function spell0_30667(pUnit, Event) --@Arcane Stream,n/a--
pUnit:FullCastSpellOnTarget(60181,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30667', 4000, 1)
end

function spell1_30667(pUnit, Event) --@Arcane Stream,n/a--
pUnit:FullCastSpellOnTarget(60204,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30667', 4000, 1)
end

function spell2_30667(pUnit, Event) --@Destroy Door Seal,n/a--
pUnit:FullCastSpellOnTarget(58040,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30667', 0, 1)
end

function spell3_30667(pUnit, Event) --@Mana Detonation,Self--
pUnit:FullCastSpellOnTarget(60182,pUnit)
pUnit:RegisterEvent('Sorts_30667', 575, 1)
end

function spell4_30667(pUnit, Event) --@Mana Detonation,Self--
pUnit:FullCastSpellOnTarget(60205,pUnit)
pUnit:RegisterEvent('Sorts_30667', 547, 1)
end

function Sorts_30667(pUnit, Event)
local choix_sorts_30667 = math.random(0, 4)
if choix_sorts_30667 == 0 then
pUnit:RegisterEvent('spell0_30667', 1, 1)
end
if choix_sorts_30667 == 1 then
pUnit:RegisterEvent('spell1_30667', 1, 1)
end
if choix_sorts_30667 == 2 then
pUnit:RegisterEvent('spell2_30667', 1, 1)
end
if choix_sorts_30667 == 3 then
pUnit:RegisterEvent('spell3_30667', 1, 1)
end
if choix_sorts_30667 == 4 then
pUnit:RegisterEvent('spell4_30667', 1, 1)
end
end

function mob30667_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30667', math.random(1500, 3000), 1)
end

function mob30667_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30667_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30667_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30667, 1, 'mob30667_Action')
RegisterUnitEvent(30667, 2, 'mob30667_Leave')
RegisterUnitEvent(30667, 3, 'mob30667_Kill')
RegisterUnitEvent(30667, 4, 'mob30667_Die')
